import Vue from 'vue'
import App from './App.vue'
import router from './router'
import VueAxiosPlugin from 'vue-axios-plugin'
import { Search } from 'vant';
import { Tab, Tabs } from 'vant';
import { Swipe, SwipeItem } from 'vant';
import { NavBar } from 'vant';
import { Rate } from 'vant';
import { ActionSheet } from 'vant';
import { Toast } from 'vant';
import { Loading } from 'vant';
import { VueJsonp } from 'vue-jsonp'
import { Divider } from 'vant';
import { Icon } from 'vant';
import { Uploader } from 'vant';
import { AddressEdit } from 'vant';
import { Popup } from 'vant';
import { Cell, CellGroup } from 'vant';
import { Grid, GridItem } from 'vant';
import { Field } from 'vant';

Vue.use(Field);

Vue.use(Grid);
Vue.use(GridItem);
Vue.use(Cell);
Vue.use(CellGroup);

Vue.use(Popup);

Vue.use(AddressEdit);

Vue.use(Uploader);

Vue.use(Icon);

Vue.use(Divider);
Vue.use(VueJsonp)
Vue.use(Loading);

Vue.use(Toast);

Vue.use(ActionSheet);

Vue.use(Rate);

Vue.use(NavBar);

Vue.use(Swipe);
Vue.use(SwipeItem);
Vue.use(Tab);
Vue.use(Tabs);
Vue.use(Search);


Vue.use(VueAxiosPlugin,{
  // 请求拦截处理
reqHandleFunc: config => config,
reqErrorFunc: error => Promise.reject(error),
// 响应拦截处理
resHandleFunc: response => response,
resErrorFunc: error => Promise.reject(error)

})
Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
